

#include <iostream>

class Rectangle
{
    int m_width;
    int m_length;

public:

    Rectangle() { std::cout << "Rectangle()" << std::endl;} ;  //无参构造函数
    ~Rectangle() { std::cout << "~Rectangle()" << std::endl;};  //析构函数
    Rectangle(float m) { std::cout << "Rectangele(float)" << std::endl;}  //转换构造函数
    Rectangle(float m , float n) { std::cout << "Rectangle(float, float)" << std::endl;};  
    Rectangle(const Rectangle& rec) { std::cout << "Rectangle(const Rectangele& rec" << std::endl; };  //拷贝构造

    operator int() {
        return 101;
    }

};


int main() {

    float f1 = 4;
    float f2 = 5;

    Rectangle rect1 = f1;
    Rectangle rect2(f1, f2);

    int i = rect1;

    std::cout << i << std::endl;

    return 0;
}